package com.njdj.gps.common.util;

public class CommonHelper {
	public static String getAlternationStyle(java.lang.Integer type){
		String style;
		if(type == 0){
			style = "class=\"trDeepColor\" onmouseout=\"mouseOutRow('trDeepColor');\" onmouseover=\"mouseOverRow(this);\"";
		}
		else{
			style = "class=\"trLightColor\" onmouseout=\"mouseOutRow('trLightColor');\" onmouseover=\"mouseOverRow(this);\"";
		}
		return style;
	}
	public static String getStrToHtml(java.lang.String str,java.lang.Integer len){
		String content="";
		if(str!=null && str.length()>len){
			content=content+str.substring(0,len)+"...";
		}else{
			content=str;
		}
		return content;
	}
}
